package com.hna.eking.AirlineServer.Mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import com.hna.eking.AirlineServer.Mapper.CustInfo;
@Mapper
public interface CustInfoMapper {
	@Select("SELECT * FROM t_cust_info WHERE Cust_No = #{0} and UUID = #{1}")
    @Results({
    	@Result(property = "﻿custNo",column = "﻿cust_no",javaType = String.class),
    	@Result(property = "nickName",column = "click_name",javaType = String.class),
    	@Result(property = "familyName",column = "family_name",javaType = String.class),
    	@Result(property = "firstName",column = "first_name",javaType = String.class),
    	@Result(property = "identifyType",column = "identify_type",javaType = String.class),
    	@Result(property = "mobileNo",column = "mobile_no",javaType = String.class),
    	@Result(property = "identifyNo",column = "identify_no",javaType = String.class),
    	@Result(property = "password",column = "password",javaType = String.class),
    	@Result(property = "email",column = "email",javaType = String.class),
    	@Result(property = "UUID",column = "UUID",javaType = String.class),
    	@Result(property = "createUser",column = "create_user",javaType = String.class),
    	@Result(property = "updateUser",column = "update_user",javaType = String.class),
    	@Result(property = "updateDate",column = "update_date",javaType = java.util.Date.class),
    	@Result(property = "createDate",column = "create_date",javaType = java.util.Date.class),
    	@Result(property = "effectFlag",column = "effect_flag",javaType = String.class)
    }) 
	CustInfo selectByUsernameAndUuid(String username, String uuid);
	
	@Select("SELECT * FROM t_cust_info WHERE mobile_no = #{0} and UUID = #{1}")
	CustInfo selectByMobileNoAndUuid(String mobileNo, String uuid);
	
	@Select("SELECT * FROM t_cust_info WHERE mobile_no = #{0} and password = #{1}")
	CustInfo selectByMobileNoAndPassword(String mobileNo, String password);
}